using System;

namespace Copperline.Escriba
{
	/// <summary>
	/// Interface class for filters
	/// </summary>
	/// <remarks>Most concrete filters will derive from <c>FilterBase</c>
	/// <see cref="FilterBase"/></remarks>
	public interface IFilter
	{

		/// <summary>
		/// Sets or gets the trigger condition that LogEntry instances must satisfy
		/// </summary>
		ETrigger Trigger { get; set; }

		/// <summary>
		/// Sets or gets the severity condition the LogEntry instances must satisfy
		/// </summary>
		ESeverity Severity { get; set; }

		/// <summary>
		/// Returns true if the severity of a log entry satisfies the trigger condition,
		/// false otherwise
		/// <see cref="ESeverity"/>
		/// </summary>
		/// <param name="severityOfEntry">the severity of the log entry</param>
		/// <returns>true if the severity condition is satisfied</returns>
		bool HasRequiredSeverity( ESeverity severityOfEntry );
	}
}
